#pragma once
#include <QObject>
#include <QVector>

#include "../user/AbstractUser.h"

class AbstractRoom : public QObject {
    Q_OBJECT
public:
    explicit AbstractRoom(const quint16& id, QObject* parent = nullptr);

    void addClient(AbstractUser* user);
    void removeClient(const quint16& userId);

    QVector<quint16> getClientIDs() const;
    void broadcast(const QByteArray& msg, quint16 excludeUserId = 0);

    quint16 getId() const { return m_id; }

private:
    quint16 m_id;
    QVector<AbstractUser*> m_clients;
};
